//
//  HELFilterheader.m
//  HandheldELearn
//
//  Created by wsj2015 on 2017/1/12.
//  Copyright © 2017年 陈武琦. All rights reserved.
//

#import "HELFilterheader.h"

@interface HELFilterheader ()

@property (weak, nonatomic) IBOutlet UILabel *resultLabel;
@property (weak, nonatomic) IBOutlet UILabel *sortLabel;

@property (weak, nonatomic) IBOutlet UILabel *cateLabel;

@property (weak, nonatomic) IBOutlet UILabel *statusLabel;

@end

@implementation HELFilterheader



+ (instancetype)filterheader{
    
    return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:0].lastObject;
}

- (IBAction)showPickAction:(id)sender {
    self.showPickerAction();
}


- (void)setResultStr:(NSString *)resultStr{
   
    self.resultLabel.text = [NSString stringWithFormat:@"共有%@条相关结果",resultStr];
    
}
- (void)setSortName:(NSString *)sortName{
    self.sortLabel.text = sortName;
}
-(void)setCateName:(NSString *)cateName{
    self.cateLabel.text = cateName;
}
-(void)setStatusName:(NSString *)statusName{
    self.statusLabel.text = statusName;
}

- (void)showWithSortType:(HELSortType)sortType cate:(HELCateType)cate status:(HELScoreType)scoreType
{
    NSString *sortStr = nil;
    NSString *cateStr = nil;
    NSString *statusStr = nil;
    switch (sortType) {
        case HELSortType_all:
             sortStr = @"全部";
            break;
        case HELSortType_Hot:
            sortStr = @"最热";
            break;
        case HELSortType_New:
            sortStr = @"最新";
            break;
        case HELSortType_Good:
            sortStr = @"好评";
            break;
     
            
        default:
            break;
    }
    switch (cate) {
        case HELCateTypeAll:
            cateStr = @"全部";
            break;
        case HELCateTypeVideo:
            cateStr = @"视频";
            break;
        case HELCateTypePic:
            cateStr = @"图文";
            break;
            
        default:
            break;
    }
    switch (scoreType) {
        case HELScoreTypeTypeAll:
            statusStr = @"全部";
            break;
        case HELScoreTypeType_I:
            statusStr = @"一类";
            break;
        case HELScoreTypeType_II:
            statusStr = @"二类";
            break;
       
            
        default:
            break;
    }
    self.sortLabel.text = sortStr;
    self.cateLabel.text = cateStr;
    self.statusLabel.text = statusStr;
    
}
//- (void)showWithSortType:(HELSortType)sortType cate:(HELCateType)cate hospitalType:(HELHosiptalType)hospitalType{
//    NSString *sortStr = nil;
//    NSString *cateStr = nil;
//    NSString *statusStr = nil;
//    switch (sortType) {
//        case HELSortTypeAll:
//            sortStr = @"全部";
//            break;
//        case HELSortTypeNew:
//            sortStr = @"时间";
//            break;
//        case HELSortTypeViewNum:
//            sortStr = @"阅读";
//            break;
//        case HELSortTypeProgress:
//            sortStr = @"进度";
//            break;
//        case HELSortTypeScore:
//            sortStr = @"评分";
//            break;
//            
//        default:
//            break;
//    }
//    switch (cate) {
//        case HELCateTypeAll:
//            cateStr = @"全部";
//            break;
//        case HELCateTypeVideo:
//            cateStr = @"视频";
//            break;
//        case HELCateTypePic:
//            cateStr = @"图文";
//            break;
//            
//        default:
//            break;
//    }
//    switch (hospitalType) {
//        case HELHELHosiptalTypeAll:
//            statusStr = @"全部";
//            break;
//        case HELHosiptalTypeHospital:
//            statusStr = @"院内";
//            break;
//        case HELHosiptalTypePublic:
//            statusStr = @"公开";
//            break;
//            
//        default:
//            break;
//    }
//    self.sortLabel.text = sortStr;
//    self.cateLabel.text = cateStr;
//    self.statusLabel.text = statusStr;
//}

@end
